package com.saudidentalapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

import com.saudiapp.webservice.Utilities.RatingDialogListener;

public class DashBoardActivity extends Activity implements OnClickListener,RatingDialogListener
{
	LinearLayout linlayAboutDentalSociety,linlayAboutApp,linlayContactDentalSociety,lilayRateApp,lilayKsuWebsite;
	
	

	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_dashboard);
		setViews();
	}
	
	void setViews()
	{
		linlayAboutDentalSociety=(LinearLayout)findViewById(R.id.xlinlayAboutDentalSociety);
		linlayAboutApp=(LinearLayout)findViewById(R.id.xlinlayAboutApp);
		linlayContactDentalSociety=(LinearLayout)findViewById(R.id.xlinlayContactDentalSociety);
		lilayRateApp=(LinearLayout)findViewById(R.id.xlilayRateApp);
		lilayKsuWebsite=(LinearLayout)findViewById(R.id.xlilayKsuWebsite);
		
		
		linlayAboutDentalSociety.setOnClickListener(this);
		linlayAboutApp.setOnClickListener(this);
		linlayContactDentalSociety.setOnClickListener(this);
		lilayRateApp.setOnClickListener(this);
		lilayKsuWebsite.setOnClickListener(this);

		 // Look up the AdView as a resource and load a request.
	}  

	@Override
	public void onClick(View v) 
	{
		switch (v.getId()) 
		{
		case R.id.xlinlayAboutDentalSociety:
			
			Intent intentAboutDs=new Intent(DashBoardActivity.this, AboutDsActivity.class);
			startActivity(intentAboutDs);
			
			break;
		case R.id.xlinlayAboutApp:
			Intent intentAboutApp=new Intent(DashBoardActivity.this, AroundTown.class);
			startActivity(intentAboutApp);
					
					break;
		case R.id.xlinlayContactDentalSociety:
			Intent intentContactDs=new Intent(DashBoardActivity.this, OrganizingCommittee.class);
			startActivity(intentContactDs);
			break;
		case R.id.xlilayRateApp:			
			Intent sciProgram=new Intent(DashBoardActivity.this, ProgramActivity.class);
			startActivity(sciProgram);
			break;
			
		case R.id.xlilayKsuWebsite:			
			Intent intentWebSite=new Intent(DashBoardActivity.this, WebActivity.class);	
			intentWebSite.putExtra("url", "http://sds.org.sa");			
			startActivity(intentWebSite);
			break;	

		default:
			break;
		}
		
	}

	@Override
	public void OnRatingSet(float rating, int id) 
	{
		// TODO Auto-generated method stub
		
	}

	@Override
	public void OnRatingCancelled() {
		// TODO Auto-generated method stub
		
	}
}
